package com.ccx.coachsite.bus;

import com.ccx.coachsite.http.BaseResp;
import com.ccx.coachsite.task.ExpertExInfoTask;
import com.ccx.coachsite.task.TaskType;

import android.content.Context;

public class ExpertExBus extends BaseBus{
	
	private ILoadBus mSuperBus;
	
	public ExpertExBus(Context context) {
		super(context);
	}
	
	public ExpertExBus(Context context, ILoadBus superBus) {
		super(context);
		mSuperBus = superBus;
	}
	
	public void loadData(String mobile) {
		ExpertExInfoTask eTask = new ExpertExInfoTask(this, mContext);
		eTask.execute();		
	}

	@Override
	public void callBack(int taskType, BaseResp response, String responseJson) {
		try
		{
			if(TaskType.TaskTypeExpertExInfo == taskType)
			{
				mSuperBus.onCompleted(response.isSuccess(), response.getDesc());
			}
		}
		catch(Exception e)
		{
			
		}
	}
}
